package com.singleton.gsj20150511;
//双重校验锁
public class LockSingleton {
	private volatile static LockSingleton instance;
	private LockSingleton(){}
	
	public static LockSingleton getInstance(){
		if(instance == null){
			synchronized(LockSingleton.class){
				if(instance == null){
					instance = new LockSingleton();
				}
			}
		}
		
		return instance;
	}
	
}
